<?php

use yii\helpers\Html;
use yii\widgets\ActiveForm;
$this->registerJsFile('@web/js/setHeight.js',['depends'=>['app\assets\AppAsset']]);
$this->registerJsFile('@web/js/comment.js',['depends'=>['app\assets\AppAsset']]);
/* @var $this yii\web\View */
/* @var $model app\models\Comment */
/* @var $form yii\widgets\ActiveForm */
?>
<script>
    var c1 = <?php echo $model->class1_id?$model->class1_id:"false" ?>;
    var c2 = <?php echo $model->class2_id?$model->class2_id:"false" ?>;
    var c3 = <?php echo $model->is_up?$model->is_up:"false" ?>;
</script>
<div class="box" style="font-size: 15px">
<div class="comment-form">

    <?php $form = ActiveForm::begin(); ?>

    <?= $form->field($model, 'user_id')->textInput() ?>

    <?= $form->field($model, 'question_id')->textInput() ?>

    <?= $form->field($model, 'comment_content')->textarea(['rows' => 6]) ?>

    <?= $form->field($model, 'url')->textInput(['maxlength' => true]) ?>

    <?= $form->field($model, 'comment_time')->textInput() ?>

    <?= $form->field($model, 'class1_id')->dropDownList(["0" => "请选择"]) ?>

    <?= $form->field($model, 'class2_id')->dropDownList(["0" => "请选择"]) ?>

    <?= $form->field($model, 'like_num')->textInput() ?>

    <?= $form->field($model, 'play_num')->textInput() ?>

    <?= $form->field($model, 'is_up')->dropDownList(["0" => "否","1" => "是"]) ?>
    <div class="form-group">
        <?= Html::submitButton($model->isNewRecord ? 'Create' : 'Update', ['class' => $model->isNewRecord ? 'btn btn-success' : 'btn btn-primary']) ?>
    </div>

    <?php ActiveForm::end(); ?>

</div>
    </div>
